package com.pb.camera.utils;


public class Url {
    public static String SERVER = "123.57.90.7";

    public static String selectAllGroups(String userId, int selectId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=SelectGroup&u=" + userId + "&p=" + selectId;
    }

    public static String requestGroupEquipment(int groupNum, String userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=DevGroup&g=" + groupNum + "&u=" + userId;
    }

    public static String createGroup(String groupName, String userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=CreateGroup&u=" + userId + "&n=" + groupName;
    }

    public static String deleteGroup(int groupNum, String userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=DeleteGroup&u=" + userId + "&g=" + groupNum;
    }

    public static String replaceGroupName(String groupNum, String newGroupName) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UpdateGroupName&g=" + groupNum + "&n=" + newGroupName;
    }

    public static String getEquipmentInfo(int equipmentType, String equipmentId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=QryDevDetail&t=" + equipmentType + "&d=" + equipmentId;
    }

    public static String removeEquipment(String userId, String eGroupNum, String eId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=MoveGroupDev&d=" + eId + "&g=" + eGroupNum + "&u=" + userId;
    }

    public static String invitePerson(String personName, String eGroupNum) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=CareGroup&u=" + personName + "&g=" + eGroupNum;
    }

    public static String firstAddEquipment(String eGroupNum, String equipmentTypeNum, String equipmentId, String  userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=AddDevJudge&g=" + eGroupNum + "&t=" + equipmentTypeNum + "&d=" + equipmentId + "&u=" + userId;
    }

    public static String addGate(String userId, String equipmentOtherName, String eGroupNum, String equipmentType, String equipmentId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=AddDev&u=" + userId + "&g=" + eGroupNum + "&a=" + equipmentOtherName + "&d=" + equipmentId + "&t=" + equipmentType;
    }

    public static String selectUserConnectionGate(String userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=QryGw&u=" + userId;
    }

    public static String selectAllGateInfo(int userId, int eType) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=TypeDevGroup&u=" + userId + "&t=" + eType;
    }

    public static String addDevice(String userID, String groupId, String alias, String deviceId, String typeId, String cityName){
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=AddDev&u="+userID+"&g="+groupId+"&a="+alias+"&d="+deviceId+"&t="+typeId;
    }

    public static String replaceEquipmentOtherName(int userId, String eId, String newOtherName) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UpdateDevName&u=" + userId + "&d=" + eId + "&a=" + newOtherName;
    }

    public static String requestEquipmentParametors(String eType, String eId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=QryConfigParameter&t=" + eType + "&d=" + eId;
    }

    public static String setGateMobile(String eType, String eId, String parameterName, String setParameterName) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=SetConfigParameter&t=" + eType + "&d=" + eId + "&an=" + parameterName + "&av=" + setParameterName;
    }

    public static String requestModelData(String userId, String mid, String mGroup) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=GetModel&u=" + userId + "&m=" + mid + "&g=" + mGroup;
    }

    public static String selectAddGateNetInfo(String equipmentId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=AppNet&d=" + equipmentId;
    }

    public static String setModel(String eTypeNum, String eIdNum, String eModelTypeNum, String eModelIdNum, String eGroupNum) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UserSelectModel&t=" + eTypeNum + "&d=" + eIdNum + "&mt=" + eModelTypeNum + "&mi=" + eModelIdNum + "&g=" + eGroupNum;
    }

    public static String saveMyselfModel(String userId, String colorMyself, String modelTypeId, String modelTypeName, String temLinkTouchUp,
                                         String temLinkTouchDown, String humLinkTouchUp, String humLinkTouchDown, String pmLinkTouch,
                                         String vocLinkTouch, String coldOrHotModel, String clockOnTime, String clockOffTime, String clockTimeGroup, String clockTimeOpenOrClose, String weekDay) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=SetCustomModel&u=" + userId + "&mt=" + modelTypeId + "&mn=" + modelTypeName
                + "&tuv=" + temLinkTouchUp + "&tdv=" + temLinkTouchDown + "&huv=" + humLinkTouchUp + "&hdv=" + humLinkTouchDown + "&pv=" + pmLinkTouch
                + "&vv=" + vocLinkTouch + "&hcm=" + coldOrHotModel + "&on=" + clockOnTime + "&of=" + clockOffTime + "&n=" + clockTimeGroup + "&ito=" + clockTimeOpenOrClose + "&c=" + colorMyself + "&w=" + weekDay;
    }

    public static String selectAllGateway(String userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UserUnderGw&u=" + userId;
    }

    public static String deleteCurrentModel(String userId, String iModelId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=DeleteCustomModel&m=" + iModelId + "&u=" + userId;
    }

    public static String selectCurrentModel(String iModelId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=GetEnvModel&m=" + iModelId;
    }

    public static String changeMyselfModelSetting(String iModelId, String colorMyself, String modelTypeName, String temLinkTouchUp,
                                                  String temLinkTouchDown, String humLinkTouchUp, String humLinkTouchDown, String pmLinkTouch,
                                                  String vocLinkTouch, String coldOrHotModel, String clockOnTime, String clockOffTime, String clockTimeGroup, String clockTimeOpenOrClose, String weekday) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UpdateEnvModel&m=" + iModelId + "&tuv=" + temLinkTouchUp + "&tdv=" + temLinkTouchDown + "&huv=" + humLinkTouchUp + "&hdv=" + humLinkTouchDown + "&pv=" + pmLinkTouch
                + "&vv=" + vocLinkTouch + "&hcm=" + coldOrHotModel + "&c=" + colorMyself + "&g=" + clockTimeGroup + "&ito=" + clockTimeOpenOrClose + "&on=" + clockOnTime + "&of=" + clockOffTime + "&n=" + modelTypeName + "&w=" + weekday;
    }

    public static String changeUserPassword(String phoneNum,
                                            String newPassword, String oldPassword) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UpdatePwd&u=" + phoneNum + "&o=" + oldPassword + "&n=" + newPassword;
    }

    public static String getReplacePhoneCommitNum(String phoneNum, String i) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=Getcode&m=" + phoneNum + "&p=" + i;
    }

    public static String changeBindPhoneNum(String submitPhoneNum, String submitCommitNum, String userNameOrOldPhone) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UpdatePhone&u=" + userNameOrOldPhone + "&v=" + submitCommitNum + "&m=" + submitPhoneNum;
    }

    public static String searchWarningMessage(String userId, String sendId, String loadOrRefresh, int showColum, int showPage) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=DevAlert&d=&i=" + sendId + "&u=" + userId + "&f=" + loadOrRefresh + "&r=" + showColum + "&p=" + showPage;
    }

    public static String searchControlMessage(String userName, String sendIdCon, String loadOrRefreshCon, int showColumCon, int showPageCon) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=Log&n=" + userName + "&f=" + loadOrRefreshCon + "&r=" + showColumCon + "&p=" + showPageCon + "&i=" + sendIdCon;
    }

    public static String searchWarningState(String userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/OldManAction?function=GetCycleAndAlert&u=" + userId;
    }

    public static String setWarningState(String userId, String state) {
        return "http://" + SERVER + "/cgi-bin/appserver/OldManAction?function=SetAlert&u=" + userId + "&m=" + state;
    }

    public static String searchEquipmentsUpdateVersion(int userId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=WiatUpgrade&u=" + userId;
    }

    public static String updateEuqipment(String dev_id, String dev_type, String update_flag) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=UpdateSoftVer&d=" + dev_id + "&t=" + dev_type + "&s=" + update_flag;
    }

    public static String requestEquipmentLinkedInfo(String dev_id) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=GetDevLink&d=" + dev_id + "&p=";
    }

    public static String requestAllEquipmentsLocationInfo(int userId, int allenvironmentId) {
        return "http://" + SERVER + "/cgi-bin/appserver/AppAction?function=AllDevGroup&s=" + allenvironmentId + "&u=" + userId;
    }
}
